package com.ziguang.redwood.admin.validator;

import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;

public class NewsValidator extends Validator{

	@Override
	protected void validate(Controller c) {
		validateRequiredString("title", "titleMsg", "标题为空");
		validateRequiredString("content", "contentMsg", "内容为空");
	}

	@Override
	protected void handleError(Controller c) {
		c.renderJson("{\"code\":1}");
	}

	
}
